package com.ymatou.iapi.userservice.service;

import org.json.JSONObject;

import com.ymatou.iapi.userservice.parameter.resp.LoginidexistsResp;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.EnvSetup;
/**
*查询登录ID是否存在Call
*FreeMaker Template自动生成代码
*/
public class LoginidexistsCall extends YmatouBaseCall{
	private static String opurl ="api/user/query/loginidexists";
	
	public LoginidexistsCall() {
		super(EnvSetup.getSystemUrl("userservice_iapi"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	/**
	 * 获取返回结果
	 * @return
	 */
	public LoginidexistsResp getResultData(){	
		LoginidexistsResp values = null;
		try {
			values = (LoginidexistsResp)FormatUtil.GSONToObject(new JSONObject(getReturnData()).toString(), LoginidexistsResp.class);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return values;
	}
}